package com.wejoy.video.middle.station.data.enums.dict;

/**
 * @Author 张文杰
 * @PackageName video-middle-station
 * @Package com.wejoy.video.middle.station.data.enums.dict
 * @Description: 工单状态枚举
 * @Date 2022/11/1 2:16 PM
 * @Version 1.0
 */
public enum EnumWorkOrderStatus {
    AGENCY(0,"未接单"),
    ACCEPT_UNPROCESSED(1,"已接单（未处置）"),
    ACCEPT_PREPROCESSING(2,"已接单（预处置）"),
    ACCEPT_PROCESSED(3,"已接单（已处置）(待审批)"),
    FINISHED(4,"已完结");
    private Integer code;
    private String text;
    EnumWorkOrderStatus(Integer code, String text) {
        this.code = code;
        this.text = text;
    }
    // 普通方法
    public static String getText(Integer code) {
        for (EnumWorkOrderStatus c : EnumWorkOrderStatus.values()) {
            if (c.getCode().equals(code)) {
                return c.text;
            }
        }
        return null;
    }
    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }
}
